package tjs.study.mini.springbootminidotest.autoconfigure;

import org.springframework.context.ConfigurableApplicationContext;
import tjs.study.mini.springbootstartsmini.boot.SpringApplication;
import tjs.study.mini.springbootstartsmini.boot.SpringBootApplication;

@SpringBootApplication
public class DoTest {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(DoTest.class, args);

        TestService testService = applicationContext.getBean(TestService.class);
        if (testService != null) {
            testService.doSomething();
        }

        TestServiceSPI testServiceSPI = applicationContext.getBean(TestServiceSPI.class);
        if (testServiceSPI != null) {
            testServiceSPI.doSomething();
        }
    }

}
